package com.example.mountainwalker.service.impl;

import com.example.mountainwalker.entity.TravelAgencyAuditDetail;
import com.example.mountainwalker.entity.TravelAgencyImageInfo;
import com.example.mountainwalker.mapper.TravelAgencyAuditMapper;
import com.example.mountainwalker.service.TravelAgencyAuditService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
public class TravelAgencyAuditServiceImpl implements TravelAgencyAuditService {
    @Autowired
    private TravelAgencyAuditMapper travelAgencyAuditMapper;

    @Override
    public TravelAgencyAuditDetail getTravelAgencyDetailById(Integer id) {
        return travelAgencyAuditMapper.getTravelAgencyDetailById(id);
    }

    @Override
    public List<TravelAgencyImageInfo> getAgencyImages(Integer travelAgencyId) {
        return travelAgencyAuditMapper.getAgencyImages(travelAgencyId);
    }

    @Transactional
    @Override
    public int updateAuditStatus(Integer id, String status) {
        return travelAgencyAuditMapper.updateAuditStatus(id, status);
    }
}
